<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>{% block title %}{% endblock %}</title>
    <link rel="shortcut icon" type="image/ico" href="/favicon.ico">
    <link href="/static/css/bootstrap.css" rel="stylesheet"/>
    <link href="/static/css/font-awesome.css" rel="stylesheet"/>
    <link href="/static/css/basic.css" rel="stylesheet"/>
    <link href="/static/css/custom.css" rel="stylesheet"/>
    <link href="/static/css/ww.css" rel="stylesheet"/>
</head>
<body>
<div id="loadingDiv"
     style="position:fixed;display:none;z-index:2000;top:0;left:0;width:100%;height:100%;background-color:rgba(152,213,187,0.5)"></div>
<div id="wrapper">
    <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{% url 'index' %}">公众号管理平台</a>
        </div>

        <div class="header-right">
            <a href="{% url 'profile' %} " class="btn btn-danger" title="修改密码"><i class="fa fa-edit fa-2x"></i></a>
            <a href="{% url 'logout' %} " class="btn btn-danger" title="登出"><i
                    class="fa fa-exclamation-circle fa-2x"></i></a>
        </div>
    </nav>
    <nav class="navbar-default navbar-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="main-menu">
                <li>
                    <div class="user-img-div">
                        <a href="/accounts/upload/"><img src="{{ user.head }}" class="img-thumbnail"/></a>

                        <div class="inner-text">
                            {{ user.realname }}
                            <br/>
                            职位:{{ user.position }}
                            <br/>
                            <small>上次登录 : {{ user.last_login }}</small>
                        </div>
                    </div>
                </li>
                {% include "nav.html" %}
            </ul>
        </div>
    </nav>
    <div id="page-wrapper">
        {% block content %}{% endblock %}
    </div>
</div>
<div id="footer-sec">
    Copyright &copy; 2016.Company name All rights reserved.<a target="_blank" href="#"></a>
</div>

<script>
    function loadJs(file) {
            var head = $("head").remove("script[role='reload']");
            $("<scri" + "pt>" + "</scr" + "ipt>").attr({ role: 'reload', src: file, type: 'text/javascript' }).appendTo(head);
    }
    window.onload=function () {
        loadJs("/static/js/jquery-1.10.2.js");
        loadJs("/static/js/bootstrap.js");
        loadJs("/static/js/jquery.metisMenu.js");
        loadJs("/static/js/custom.js");
        loadJs("/static/js/ww.js");
        loadJs("/static/js/layer.js");
    };
</script>
</body>
</html>
